﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>提现管理</title>
    <link href="~/plugins/layui/css/layui.css" rel="stylesheet" />
</head>
<body style="margin-left:10px;margin-top:10px;">
    <div id="ss" class="layui-form-item">
        <div class="layui-inline">
            <div class="layui-input-inline" style="width: 30px;">
                <i class="layui-icon" style="font-size: 30px; color: #1E9FFF;">&#xe615;</i>
            </div>
            <div class="layui-input-inline" style="width: 99px;">
                <button type="button" class="layui-btn layui-btn-mini layui-btn-primary" style="width:99px;">卡密激活状态</button>
                <select name="pay_status">
                    <option value="0" selected="">= 全部状态 =</option>
                    @foreach (string name in Enum.GetNames(typeof(LJShengHelper.PayStatus)))
                    {
                        LJShengHelper.PayStatus type = (LJShengHelper.PayStatus)Enum.Parse(typeof(LJShengHelper.PayStatus), name, true);
                        if (Request.QueryString["pay"] == "1" && @name == "已激活")
                        {
                            <option value="@((int)type)" selected="selected">@name</option>
                        }
                        else if (Request.QueryString["pay"] == "2" && @name == "未激活")
                        {
                            <option value="@((int)type)" selected="selected">@name</option>
                        }
                        else
                        {
                            <option value="@((int)type)">@name</option>
                        }
                    }
                </select>
            </div>
            <div class="layui-input-inline" style="width: 80px;">
                <input type="text" placeholder="套餐名称" name="name" class="layui-input" />
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="卡密" name="kami" class="layui-input" />
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="机器码/备注" name="post" class="layui-input" />
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="订单号" name="order_no" class="layui-input" />
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="激活时间" name="stime" autocomplete="off" lay-verify="date" class="layui-input" onclick="layui.laydate({ elem: this, istime: true, festival: true, format: 'YYYY-MM-DD hh:mm:ss' })" />
            </div>
            <div class="layui-form-mid">-</div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="激活时间" name="etime" autocomplete="off" lay-verify="date" class="layui-input" onclick="layui.laydate({ elem: this, istime: true, festival: true, format: 'YYYY-MM-DD hh:mm:ss' })" />
            </div>
            <div class="layui-input-inline">
                <button onclick="getlist(1);" class="layui-btn">给偶搜</button>
            </div>
        </div>
    </div>
    <div class="layui-form">
        <table class="layui-table">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>系统订单号/卡密</th>
                    <th>套餐名称</th>
                    <th>创建/激活时间</th>
                    <th>订单数量/单价</th>
                    <th>管理操作</th>
                </tr>
            </thead>
            <tbody id="tbody">
                <script id="tpl" type="text/html">
                    {{each list as item index}}
                <tr style="background-color:{{index%2 ==0 ?"#FFFFF0":""}};" id="{{item.gid}}">
                    <td rowspan="2">{{index+1}}</td>
                    <td>{{item.order_no}}</td>
                    <td>{{item.name}}</td>
                    <td>{{item.addtime}} (激活={{item.pay_time}})</td>
                    <td><div class="layui-btn  layui-btn-mini layui-btn-primary layui-border-gree">{{item.num}}</div></td>
                    <td><div class="layui-btn layui-btn-radius layui-btn-mini {{item.pay_status=="1"?"":"layui-btn-normal"}}">{{item.pay_status=="1"?"已激活":"未激活"}}</div></td>
                </tr>
                <tr style="background-color:{{index%2 ==0 ?"#FFFFF0":""}};" id="1{{item.gid}}">
                    <td style="color:blue;">{{item.coupon_number}}</td>
                    <td><div class="layui-btn layui-btn-mini layui-btn-warm layui-border-gree">{{item.tianshu}}天</div></td>
                    <td style="color:red;">{{item.remarks}}</td>
                    <td><span style="color: gree;">{{item.user_cash}}</span></td>
                    <td>
                        <button class="layui-btn layui-btn-mini layui-btn-danger" onclick="Showiframe('{{item.account}}','/kmpost.aspx?pay={{item.pay_status}}&kami={{item.coupon_number}}&remarks={{item.remarks}}');">{{item.pay_status=="1"?"修改":"激活"}}</button>
                    </td>
                </tr>
                {{/each}}
                </script>
            </tbody>
        </table>
    </div>
    <div id="page"></div>
    共 <label id="pages">0</label> 页, <label id="count">0</label> 条数据
    <label id="Controllers" class="layui-hide">order</label>
    <script src="~/js/jquery.js"></script>
    <script src="~/plugins/layui/layui.js"></script>
    <script src="~/js/template-web.js"></script>
    <script src="~/js/homelist.js"></script>
</body>
</html>